package com.getui.java.advancedpushmessage;

import java.util.ArrayList;
import java.util.List;

import com.getui.java.COMM;
import com.gexin.rp.sdk.base.IQueryResult;
import com.gexin.rp.sdk.http.IGtPush;

public class SetTagDemo {

	public static void main(String[] args) throws Exception {
		setTag();
		System.out.println(COMM.CID);

	}

	public static void setTag() {
		IGtPush push = new IGtPush(COMM.host, COMM.appKey, COMM.masterSecret);
		List<String> tagList = new ArrayList<String>();
		tagList.add(String.valueOf("18-20"));
		tagList.add("杭州");
		tagList.add("美女");
		IQueryResult ret = push.setClientTag(COMM.appId, COMM.CID, tagList);
		System.out.println(ret.getResponse().toString());
		// {result=Success}
		// {result=OverLimit} BUG: 当Tag太长时，返回OverLimit，改小后，还是返回OverLimit
	}
}